package com.example.xd.javatest.pattern_test;

/**
 * @auther XuDan on 2020/6/22.
 * 范型方法
 */
public class PatternMethod {
    public <T extends Comparable> T add(T t1, T t2) {
        if (t1.compareTo(t2) > 0) {
            return t1;
        } else {
            return t2;
        }
    }
}
